{% for entity in entities %}
<div class="one-third portfolio-item{% if ((loop.index-1) % 3) == 2 %} last{% endif %}">
    {% if entity.image %}
        <img class="rounded" src="{{ entity.image }}" alt='{{ entity.name }}' width='280' height='125' />
    {% endif %}
    <h3><a href="{% if entity.type == 'call' %}
                    {{ url('call_show', { 'id': entity.id }) }}
                {% else %}
                    {{ url('project_show', { 'id': entity.id }) }}
                {% endif %}
           ">{{ entity.name | capitalize }}</a></h3>
    <p>
        {{ entity.description }}
        <span class="read-more">
            {% if entity.website %}
            <a href="{{ entity.website }}" title="{{ entity.name }}" target="_blank" rel="nofollow">Visit Site</a>
            {% endif %}
            <a href="
                {% if entity.type == 'call' %}
                    {{ url('call_show', { 'id': entity.id }) }}
                {% else %}
                    {{ url('project_show', { 'id': entity.id }) }}
                {% endif %}
                ">Read more »</a>
        </span>
    </p>
</div>
{% if ((loop.index-1) % 3) == 2 %}<div class="big-spacer"></div>{% endif %}
{% else %}
<p class="notice">Nothing Found</p>
{% endfor %}

<div class="big-spacer"></div>

{% if lastPageNumber > 1 %}
<div class="paginator">
    <div class="pagingContainer">
        {% if page > 1 %}
            <a href="#search" onclick="$('#Kateba_goobundle_searchtype_page').attr('value', 1); getResults();" class="first">First</a>
            <a href="#search" onclick="$('#Kateba_goobundle_searchtype_page').attr('value', {{ page - 1 }}); getResults();">« Prev</a>
        {% endif %}
        <div>
            {% for numberOfPage in 1..lastPageNumber %}
                <a href="#search" onclick="$('#Kateba_goobundle_searchtype_page').attr('value', {{ numberOfPage }}); getResults();" class="
                {% if (numberOfPage == lastPageNumber) and (numberOfPage == page) %}
                last
                {% elseif (numberOfPage == 1) and (numberOfPage == page) %}first{% endif %}
                {% if numberOfPage == page %}
                    active{% endif%}">{{ numberOfPage }}</a>

            {% endfor %}
        </div>
        {% if page < lastPageNumber %}
            <a href="#search" onclick="$('#Kateba_goobundle_searchtype_page').attr('value', {{ page + 1 }}); getResults();">Next »</a>
            <a href="#search" onclick="$('#Kateba_goobundle_searchtype_page').attr('value', {{ lastPageNumber }}); getResults();" class="last">Last</a>
        {% endif %}
    </div>
</div>
{% endif %}